package com.ruoyi.visit.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.visit.mapper.WithinManagedMapper;
import com.ruoyi.visit.domain.WithinManaged;
import com.ruoyi.visit.service.IWithinManagedService;

/**
 * 限期整改Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-23
 */
@Service
public class WithinManagedServiceImpl implements IWithinManagedService 
{
    @Autowired
    private WithinManagedMapper withinManagedMapper;

    /**
     * 查询限期整改
     * 
     * @param wmId 限期整改ID
     * @return 限期整改
     */
    @Override
    public WithinManaged selectWithinManagedById(Long wmId)
    {
        return withinManagedMapper.selectWithinManagedById(wmId);
    }

    /**
     * 查询限期整改列表
     * 
     * @param withinManaged 限期整改
     * @return 限期整改
     */
    @Override
    public List<WithinManaged> selectWithinManagedList(WithinManaged withinManaged)
    {
        return withinManagedMapper.selectWithinManagedList(withinManaged);
    }

    /**
     * 新增限期整改
     * 
     * @param withinManaged 限期整改
     * @return 结果
     */
    @Override
    public int insertWithinManaged(WithinManaged withinManaged)
    {
        withinManaged.setCreateTime(DateUtils.getNowDate());
        return withinManagedMapper.insertWithinManaged(withinManaged);
    }

    /**
     * 修改限期整改
     * 
     * @param withinManaged 限期整改
     * @return 结果
     */
    @Override
    public int updateWithinManaged(WithinManaged withinManaged)
    {
        withinManaged.setUpdateTime(DateUtils.getNowDate());
        return withinManagedMapper.updateWithinManaged(withinManaged);
    }

    /**
     * 批量删除限期整改
     * 
     * @param wmIds 需要删除的限期整改ID
     * @return 结果
     */
    @Override
    public int deleteWithinManagedByIds(Long[] wmIds)
    {
        return withinManagedMapper.deleteWithinManagedByIds(wmIds);
    }

    /**
     * 删除限期整改信息
     * 
     * @param wmId 限期整改ID
     * @return 结果
     */
    @Override
    public int deleteWithinManagedById(Long wmId)
    {
        return withinManagedMapper.deleteWithinManagedById(wmId);
    }
}
